Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Nov 3, 2025

Use commit hash instead of version tag for better security and reproducibility.

Copilot AI review requested due to automatic review settings November 3, 2025 10:35
@Marenz Marenz requested review from a team as code owners November 3, 2025 10:35
@github-actions github-actions bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Nov 3, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a GitHub Actions workflow to automatically merge pull requests created by Dependabot. The workflow triggers on all pull requests, checks if the actor is Dependabot, and uses a third-party action to auto-approve and merge the PR with the 'merge' method.

  • Introduces automated Dependabot PR approval and merging
  • Uses the frequenz-floss/dependabot-auto-approve action with commit hash pinning
  • Grants necessary write permissions for contents and pull requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 15 to 19
- name: Auto-merge Dependabot PR
uses: frequenz-floss/dependabot-auto-approve@005e52004f5d5c6af2f81b89ec25e5cf6f3dfd77 # v1.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge'
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action name 'dependabot-auto-approve' suggests it only approves PRs, but the workflow is configured to auto-merge them. Consider verifying this action performs both approval and merging as intended, or use GitHub's native auto-merge feature with 'gh pr merge --auto' in a run step instead for more explicit control.

Suggested change
- name: Auto-merge Dependabot PR
uses: frequenz-floss/dependabot-auto-approve@005e52004f5d5c6af2f81b89ec25e5cf6f3dfd77 # v1.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge'
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up GitHub CLI
uses: actions/setup-gh@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve PR
run: gh pr review ${{ github.event.pull_request.number }} --approve
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Auto-merge PR
run: gh pr merge ${{ github.event.pull_request.number }} --auto --merge
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.
name: Auto-merge Dependabot PRs

on:
pull_request:
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The workflow triggers on all pull_request events without activity type filtering. Consider adding 'types: [opened, reopened, synchronize]' to avoid unnecessary workflow runs on events like 'labeled' or 'assigned'.

Suggested change
pull_request:
pull_request:
types: [opened, reopened, synchronize]

Copilot uses AI. Check for mistakes.
uses: frequenz-floss/dependabot-auto-approve@005e52004f5d5c6af2f81b89ec25e5cf6f3dfd77 # v1.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
merge-method: 'merge'
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using 'merge' creates merge commits for every Dependabot update, which can clutter the git history. Consider using 'squash' or 'rebase' to maintain a cleaner commit history, especially for dependency updates.

Suggested change
merge-method: 'merge'
merge-method: 'squash'

Copilot uses AI. Check for mistakes.
@Marenz Marenz dismissed tiyash-basu-frequenz’s stale review November 3, 2025 11:33

The merge-base changed after approval.

@Marenz Marenz enabled auto-merge November 3, 2025 13:47
Use commit hash instead of version tag for better security and
reproducibility.

Signed-off-by: Mathias L. Baumann <[email protected]>
@Marenz Marenz force-pushed the update-dependabot-action branch from ab80a56 to 556f2fe Compare November 4, 2025 12:47
@Marenz Marenz added this pull request to the merge queue Nov 14, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 9c34449 Nov 14, 2025
6 checks passed
@Marenz Marenz deleted the update-dependabot-action branch November 14, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants